define(["app/utils/HttpClientUtils"],function (hc) {

	
	return {
		initMyOrganizationList: function(uuid, callback_Func){
	
			var unionid = $.getHashUrlParam("unionid");
			if($.isNull(unionid)){
				callback_Func.call();
			}else{
				var url = $.wjtBaseBackend + "/wjt/org_list";
				var body = {
					"uuid": uuid
				};
				hc.sendPOST(url, JSON.stringify(body),callback_Func, null, true);
			}
		},
		initRecommendOrganizationList: function(callback_Func){

			var url = $.wjtBaseBackend + "/wjt/org_rec_list";
			hc.sendGET(url,callback_Func, null, true);
		},
		createOrganization: function(logourl,name,des,unionid,callback_Func){
			var url = $.wjtBaseBackend + "/wjt/org_create";
			var body = {
				"unionid": unionid,
				"logourl": logourl,
				"name": name,
				"introduction": des,
				"title": name,
				"type": "1"
			};
			hc.sendPOST(url, JSON.stringify(body),callback_Func, null, true);
		},
		getOrganizationDetails: function(orgUuid, callback_Func){
			
			var unionid = $.getHashUrlParam("unionid");

			if($.isNull(unionid)){
				callback_Func.call();
			}else{

				var url = $.wjtBaseBackend + "/wjt/org_details";

				var body = {
					"unionid": unionid,
					"orguuid": orgUuid
				};
				hc.sendPOST(url, JSON.stringify(body),callback_Func, null, true);
			}
		}
	};

});
